#include<bits/stdc++.h>
using namespace std;
int n,r[100000],m[100000],x,y,ans,ms;
int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    scanf("%d",&n);
    for(int i=0;i<n;i++) scanf("%d",&r[i]);
    sort(r,r+n);
    for(int i=0;i<n;i+=x){
        x=0;
        y=r[i];
        do{x++;}while(r[i+x]==y);
        m[ms++]=x;
    }
    for(int i=1;i<ms;i++){
        int h=m[i];
        for(int j=0;j<i&&h>0;j++) if(m[j]>0){int z=min(h,m[j]);h-=z;m[j]-=z;ans+=z;}
    }
    printf("%d\n",n-ans);
    return 0;
}
